<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-right" role="group">
							<button class="btn btn-success" onclick="reLoad()">
								<i class="fa fa-search" aria-hidden="true"></i>查询
							</button>
							<button shiro:hasPermission="nodirectList:manage:newList" type="button" class="btn btn-primary" onclick="newNodirectList()">
								<i class="fa fa-plus" aria-hidden="true"></i>生成新清单
							</button>
						</div>
						<div class="pull-left search nopadding" style="size: 30%">
							<input type="text" class="laydate-icon form-control" placeholder="生成时间"
											   id="createTime" name="createTime"
											   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"
											   style="background-color: #fff;" readonly="readonly"/>
						</div>
                        <div class="search col-md-3 nopadding" data-toggle="distpicker" id="dist_target">
                            <div class="col-sm-6" style="padding-right: 0px">
                                <select class="form-control chosen-select" id="province" name="province" data-province="----选择省----"></select>
                            </div>
                            <div class="col-sm-6" style="padding-left: 0px">
                                <select class="form-control chosen-select"  id="city" name="city"  data-city="----选择市----"></select>
                            </div>
                        </div>
                        <input type="hidden" id="centreId" th:value="${centreId}" th:if="${flag} == '1'">
						<div class="columns pull-left col-md-1 nopadding" th:if="${flag} == '0'">
							<select data-placeholder="商户" class="form-control chosen-select" id="centreId" tabindex="2">
								<option value="" selected="selected">选择商户</option>
								<option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}"></option>
							</select>
						</div>
					</div>
					<table id="nodirectListTable" data-mobile-responsive="true"></table>
				</div>
			</div>
		</div>

		<div>
			<script type="text/javascript">
				var s_line_h = 'hidden';
				var s_comSorting_h = 'hidden';
				var s_giveCommodity_h = 'hidden';
			</script>
		</div>
		<div shiro:hasPermission="nodirectList:manage:line">
			<script type="text/javascript">
			    s_line_h = '';
			</script>
		</div>
		<div shiro:hasPermission="nodirectList:manage:comSorting">
			<script type="text/javascript">
			    s_comSorting_h = '';
			</script>
		</div>
		<div shiro:hasPermission="nodirectList:manage:giveCommodity">
			<script type="text/javascript">
			    s_giveCommodity_h = '';
			</script>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script src="/js/plugins/distpicker/distpicker.data.min.js" ></script>
    <script src="/js/plugins/distpicker/distpicker.min.js" ></script>
	<script type="text/javascript" src="/js/appjs/logistics/nodirectList/nodirectList.js"></script>
</body>
</html>